package com.leha.core.services.imp;

import com.leha.core.constants.CoreErrorDict;
import com.leha.core.services.ErrorMessageServices;
import org.springframework.stereotype.Service;

/**
 * Created by xiabin on 2017/7/26.
 */
@Service
public class ErrorMessageServicesImpl implements ErrorMessageServices {

    private ThreadLocal<CoreErrorDict> lastError = new ThreadLocal<>();

    @Override
    public CoreErrorDict getLastError() {
        return lastError.get();
    }

    @Override
    public void setError(CoreErrorDict error) {
        lastError.set(error);
    }
}
